<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->resource('category', CategoryController::class);
    $router->resource('product', ProductController::class);
    $router->resource('resource', ResourceController::class);
    $router->resource('hotspecial', SpeciasController::class);
    $router->resource('activities', ActivitiesController::class);
    $router->resource('slideshow', SlideshowController::class);
    $router->resource('bestsellers', BestsellersController::class);
    $router->resource('bscategories', BestsellersCategoriesController::class);
    $router->resource('newarrivals', NewBookRecommendController::class);
    $router->resource('file', FileController::class);
    $router->resource('downloadRecord', DownloadRecordController::class);
    $router->resource('job', JobController::class);
    $router->resource('sector', SectorController::class);
    $router->resource('cultures', CultureWallController::class);
    $router->get('widgets/payconfig', 'PayConfigController@payconfig');
    $router->post('widgets/payconfig', 'PayConfigController@submitPayConfig');
    $router->get('widgets/paypresent', 'PayConfigController@payPresent');//赠送充值
    $router->post('widgets/paypresent', 'PayConfigController@submitPayPresent');//赠送充值数据提交
    $router->resource('widgets/paytemplets', PayTempletsController::class);  
    $router->get('api/users', 'PayConfigController@users');
    $router->resource('trade-activities', TradeActivitiesController::class);
    $router->resource('trade-recommend', TradeRecommendController::class);

    $router->get('product/auditing/one', 'ProductController@auditingOne');
    $router->get('product/auditing/two', 'ProductController@auditingTwo');
    $router->get('product/auditing/three', 'ProductController@auditingThree');
    $router->post('product/auditing', 'ProductController@postAuditing')->name('admin.product.auditing');
    $router->get('product/preview/{uuid}', 'ProductController@preview')->name('product.preview');

    $router->resource('member', MemberController::class);
    $router->resource('rechargerecords', RechargeRecordController::class);
    $router->post('member/usertools', 'MemberController@userTools');
    $router->resource('auth/users', UserController::class);
    $router->resource('auth/roles', RoleController::class);
    $router->get('auth/setting', 'AuthController@getSetting');
    $router->put('auth/setting', 'AuthController@putSetting');

    $router->get('companyIntroduce/{language}', 'CompanyProfileController@introduce');
    $router->post('subIntroduce', 'CompanyProfileController@postIntroduce');
    $router->get('categoryList', 'CategoryController@lists')->name('categoryList');
});
